<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>

<?php 
	$ci = &get_instance();
	$ESCORT = $ci->escort_entity->init('user_id',$USER->getId());
	
	$paymentTypeDataArray = getPaymentTypesData_ioc();
	$pricingTimeDataArray = getPricingTimeData_ioc();
	$transportDataArray = getTransportData_ioc();
	$extrasDataArray = getExtrasData_ioc();
	
	$currentPricingTimeArray = $ESCORT->getPricingTimeIdArray($USER->getId());
	$paymentSelectedArray = $ESCORT->getPaymentMethodIds() ? explode(',',$ESCORT->getPaymentMethodIds()):array();
	$extraSelectedArray = $ESCORT->getExtrasIds() ? explode(',',$ESCORT->getExtrasIds()):array();
?>

<?php if( $ESCORT->getPublicPaymentMethod() == 1 ): ?>
	<div class="escort-infor-item-wrapper">
		<div class="escort-infor-item-left">
			<span><?php echo language_translate('rates_payment');?></span>
		</div>
		<div class="escort-infor-item-right">
			<span>
				<?php 
					$myPaymentArray = array();
					foreach($paymentSelectedArray as $item){
						$myPaymentArray[] = $paymentTypeDataArray[$item];
					}
					echo implode(', ',$myPaymentArray);
				?>
			</span>
		</div>
		<div class="clear"></div>
	</div>
<?php endif; ?>

<?php if( $ESCORT->getPublicPricingTime() == 1 ): ?>
	<div class="escort-infor-item-wrapper">
		<div class="escort-infor-item-left">
			<span><?php echo language_translate('rates_pricing');?></span>
		</div>
		<div class="escort-infor-item-right">
			<ul>
				<?php 
					foreach($currentPricingTimeArray as $item){
						echo "<li><span>";
						echo $pricingTimeDataArray[$item].": ";
						
						$PRICE_OBJ = $ESCORT->getPricingTime($USER->getId(), $item);
						$price = $PRICE_OBJ ? $PRICE_OBJ->price :'';
						echo $price.'&euro;';
						echo "</span></li>";
					}
				?>
			</ul>
		</div>
		<div class="clear"></div>
	</div>
<?php endif; ?>

<?php if( $ESCORT->getPublicTransportInclude() == 1 ): ?>
	<div class="escort-infor-item-wrapper">
		<div class="escort-infor-item-left">
			<span><?php echo language_translate('rates_transport');?></span>
		</div>
		<div class="escort-infor-item-right">
			<span>
				<?php 
					echo $transportDataArray[$ESCORT->getTransportIncludeId()];
				?>
			</span>
		</div>
		<div class="clear"></div>
	</div>
<?php endif; ?>

<?php if( $ESCORT->getPublicExtras() == 1 ): ?>
	<div class="escort-infor-item-wrapper">
		<div class="escort-infor-item-left">
			<span><?php echo language_translate('rates_extras');?></span>
		</div>
		<div class="escort-infor-item-right">
			<span>
				<?php 
					 foreach($extraSelectedArray as $item){
						echo "<li><span>";
						echo $extrasDataArray[$item];
						echo "</span></li>";
					}
				?>
			</span>
		</div>
		<div class="clear"></div>
	</div>
<?php endif; ?>

